package ejb.dto;

import java.util.List;

import org.primefaces.model.UploadedFile;

public class HotelDTO {
	
	private int id;
	private String address;
	private String description;
	private LocationDTO location;
	private String name;
	private List<HotelAvailabilityDTO> hotelAvailabilities;

	private int locationId;
	private UploadedFile image;

	private String extra;
	private String fromPrice;
	private float minPrice;
	private String reservationInfo;

	//GETTER AND SETTER
	
	public String getFromPrice() {
		return fromPrice;
	}

	public void setFromPrice(String fromPrice) {
		this.fromPrice = fromPrice;
	}

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public LocationDTO getLocation() {
		return this.location;
	}

	public void setLocation(LocationDTO location) {
		this.location = location;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<HotelAvailabilityDTO> getHotelAvailabilities() {
		return this.hotelAvailabilities;
	}

	public void setHotelAvailabilities(List<HotelAvailabilityDTO> hotelAvailabilities) {
		this.hotelAvailabilities = hotelAvailabilities;
	}

	public int getLocationId() {
		return locationId;
	}

	public void setLocationId(int nationId) {
		this.locationId = nationId;
	}

	public String getExtra() {
		return extra;
	}

	public void setExtra(String extra) {
		this.extra = extra;
	}

	public float getMinPrice() {
		return minPrice;
	}

	public void setMinPrice(float minPrice2) {
		this.minPrice = minPrice2;
	}

	public String getReservationInfo() {
		return reservationInfo;
	}

	public void setReservationInfo(String reservationInfo) {
		this.reservationInfo = reservationInfo;
	}

	public UploadedFile getImage() {
		return image;
	}

	public void setImage(UploadedFile image) {
		this.image = image;
	}
	
	//METHODS

	/**
	 * Add HotelAvailabilityDTO to list
	 * @param hotelAvailability
	 * @return list of HotelAvailabilityDTO
	 */
	public HotelAvailabilityDTO addHotelAvailability(HotelAvailabilityDTO hotelAvailability) {
		getHotelAvailabilities().add(hotelAvailability);
		hotelAvailability.setHotel(this);

		return hotelAvailability;
	}

	/**
	 * Remove HotelAvailabilityDTO from list
	 * @param hotelAvailability
	 * @return list of HotelAvailabilityDTO
	 */
	public HotelAvailabilityDTO removeHotelAvailability(HotelAvailabilityDTO hotelAvailability) {
		getHotelAvailabilities().remove(hotelAvailability);
		hotelAvailability.setHotel(null);

		return hotelAvailability;
	}

}